import request from '@/util/request.js';

/**
 * @description 用户地址信息列表
 * @param {Object} data
 */
export function getUserAddressList(data) {
	return request({
		url: '/address/getUserAddressList',
		method: 'GET',
		data
	})
}
/**
 * @description 用户地址信息详情
 * @param {Object} data
 */
export function getAddressById(data) {
	return request({
		url: '/address/getAddressById',
		method: 'GET',
		data
	})
}

/**
 * @description 新增和修改地址信息
 * @param {Object} data
 */
export function addAndUpdateAddress(data) {
	return request({
		url: '/address/addAndUpdateAddress',
		method: 'post',
		data
	})
}
/**
 * @description 设置默认地址
 * @param {Object} data
 */
export function updateDefaultAddress(data) {
	return request({
		url: '/address/updateDefaultAddress',
		method: 'post',
		data
	})
}
/**
 * @description 删除
 * @param {Object} data
 */
export function delAddress(data) {
	return request({
		url: '/address/delAddress',
		method: 'GET',
		data
	})
}